/*
 *  $Id: Clear.cs 1051 2010-05-18 22:10:41Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008-2009 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Air.Spells {
    public class Clear: SpellCard<UnionData> {
        public Clear(): base("001_a_s_clear") {
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Air;
            Value = 100;
            Target = new UnionTarget(GetTargetPhrase(), CreatureTarget.Both, LandTarget.Both);
            AddManaCost(ElementType.Air, 3);
        }

        protected override void DoAction(TargetArgs<UnionData> args) {
            AbstractObject target = null;
            TargetArgs<Creature> ca;
            TargetArgs<Land> la;
            switch (args.Target.GetArgs<Creature, Land>(out ca, out la)) {
                case 1:
                    target = ca.Target;
                    break;
                case 2:
                    target = la.Target;
                    break;
                default:
                    return;
            }
            target.DispellAffects();
        }
    }
}
